<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>订单详情</title>
  <script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js"></script>
</head>
<body>

<table cellpadding="0" cellspacing="0" border="1" width="700px">
  <thead>
  <tr>
    <th>商品名称</th>
    <th>图片</th>
    <th>订单价格</th>
    <th>下单时间</th>
    <th>订单状态</th>
  </tr>
  </thead>
  <tbody>
  <tr>
    <td th:text="${order.name}"></td>
    <td th:text="${goods.img}"></td>
    <td th:text="${order.price}"></td>
    <td th:text="${#dates.format(order.createDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
    <td>
      <span th:if="${order.status eq 0}">未支付</span>
      <span th:if="${order.status eq 1}">待发货</span>
      <span th:if="${order.status eq 2}">已发货</span>
      <span th:if="${order.status eq 3}">已签收</span>
      <span th:if="${order.status eq 4}">已退款</span>
      <span th:if="${order.status eq 5}">已完成</span>
    </td>
  </tr>
  </tbody>
</table>

<div th:if="${order.status eq 0}">
  <button>立即支付</button>
</div>

</body>
</html>
